package com.fatsatsuma.email;

import org.apache.commons.mail.EmailException;

/**
 * @author $Id: IEmailService.java,v 1.3 2006/12/15 15:55:55 gevans Exp $
 */
public interface IEmailService {

	/**
	 * 
	 * @param key
	 * @return
	 */
	public IEmailTemplate getEmailTemplateByKey(String key);

	/**
	 * 
	 * @param url
	 * @return
	 * @throws WebRequestFailedException
	 */
	public EmailTemplate getEmailTemplateFromUrl(String url) throws WebRequestFailedException;

	/**
	 * 
	 * @param emailTemplate
	 * @param receipent
	 * @param overrideMailHost
	 * @throws EmailException
	 */
	public void sendEmail(IEmailTemplate emailTemplate, IReceipent receipent, String overrideMailHost)
			throws EmailException;
}
